#ifndef NR_OBJECT_MANAGER_H
#define NR_OBJECT_MANAGER_H

#include "nr_device_type_manager.h"
#include "nr_device_item_manager.h"
#include "nr_channel_manager.h"
#include "nr_io_manager.h"
#include "nr_scheduler_manager.h"
#include "nr_user_role_manager.h"

class nr_object_manager : nr_manager_base
{
    Q_OBJECT
public:
    static nr_object_manager& instance();
    static void destroy();
        
    virtual nr_error_t load();
    virtual nr_error_t unload();
    
    nr_device_type_manager& devive_type_manager() { return m_device_type_manager; }
    nr_device_item_manager& device_item_manager() { return m_device_item_manager; }
    nr_channel_manager& channel_manager() { return m_channel_manager; }
    nr_scheduler_manager& scheduler_manager() { return m_scheduler_manager; }
    nr_user_role_manager& user_role_manager() { return m_user_role_manager; }
    
private:
    nr_object_manager(QObject *parent = NULL);
    ~nr_object_manager();
    
    nr_device_type_manager m_device_type_manager;
    nr_device_item_manager m_device_item_manager;
    nr_channel_manager m_channel_manager;
    nr_io_manager m_io_manager;
    nr_scheduler_manager m_scheduler_manager;
    nr_user_role_manager m_user_role_manager;
    
    static nr_object_manager* g_object_manager;
};

#endif // NR_OBJECT_MANAGER_H
